package com.time.company.webserver.helper;

import android.content.Context;
import android.content.res.Resources;

import com.time.company.R;

/**
 * Created by Bing on 2016/8/23.
 * E-mail is tx16bing@163.com
 */
public class WebServerUrlBuilder {

    private static WebServerUrlBuilder webServicesUrlBuilder;
    private Resources resources;
    private String baseUrl;

    public WebServerUrlBuilder(Context context) {
        this.resources = context.getResources();
        this.baseUrl = context.getString(R.string.web_service_base_url_init);
    }

    public static synchronized WebServerUrlBuilder getInstance(Context context) {

        if (webServicesUrlBuilder == null) {
            webServicesUrlBuilder = new WebServerUrlBuilder(context);
        }
        return webServicesUrlBuilder;
    }

    public String getBaseUrl() {
        return this.baseUrl;
    }
}
